// 引入 react 依赖
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Text, View, Image, TouchableOpacity, ImageBackground, ScrollView, InteractionManager } from 'react-native';

// 引入第三方依赖
import _ from 'lodash';
import pureRender from 'pure-render-decorator';

// antd 按需加载
import { Tabs, Toast, List } from '@ant-design/react-native';
const Item = List.Item
// 引入 处理数据 所需文件
import { } from './module/module.js'

// 引入样式
import Style from './style/style.js';

// 引入公用组件
import { Status, NavBar } from '../../components/index.js'

// 引入专用组件
import { } from './components'

// 引入工具包
import { press, size, ScreenWidth } from '../../util/utils.js'
class UserInfo extends Component {
  constructor(props) {
    super(props)
    this.state = {
      refreshing: false,
      // // searchBackgroundColor: 'transparent',
      // searchBackgroundColor: '#e43130',
    }
    // this.billboard = billboard.bind(this)
  }

  componentDidMount() {
    const { } = this.props
    // InteractionManager.runAfterInteractions(() => {
    // ...耗时较长的同步执行的任务...
    // });
  }


  render() {
    const { userInfo } = this.props
    return (
      <View style={Style.container}>
        <Status />
        <NavBar
          title="账户信息"
          back={true}
        />
        <View style={Style.content}>
          <List >
            <Item
              extra={
                userInfo.icon
                  ?
                  <RnImage resizeMode='cover' style={{ width: 70, height: 70, marginBottom: 15, borderRadius: 35, backgroundColor: '#fff' }} uri={data.pic} />
                  :
                  <Image resizeMode='cover' style={{ width: 70, height: 70, marginBottom: 15, borderRadius: 35, backgroundColor: '#fff' }} source={require('../../static/images/user-bg.png')} />
              }
              multipleLine
            >头像</Item>
            <Item extra={userInfo.nickname} onPress={() => { }}>会员名</Item>
            {/* <Item extra={userInfo.email} onPress={() => { }}>邮箱</Item> */}
            <Item extra={userInfo.mobile} onPress={() => { }}>电话</Item>
          </List>
        </View>
      </View >
    );
  }
}

export default connect(({ userInfo }) => ({
  userInfo,
}))(pureRender(UserInfo))
